package test;

import extthread.MyThread;

/**
 * println()方法与i++联合使用时“有可能”出现的另外一种异常情况
 * 说明：虽然println()方法在内部是同步的，但i--的操作却是在进入println()之前发生的
 * 所以有发生费线程安全问题的概率
 */
public class Run {

	public static void main(String[] args) {

		MyThread run = new MyThread();

		Thread t1 = new Thread(run);
		Thread t2 = new Thread(run);
		Thread t3 = new Thread(run);
		Thread t4 = new Thread(run);
		Thread t5 = new Thread(run);

		t1.start();
		t2.start();
		t3.start();
		t4.start();
		t5.start();


	}

}
